<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Expires" content="-1" />
	<title>ST Manager</title>
	<link href="imagem/favicon.png" type="image/png" rel="shortcut icon" />
	<script type="text/javascript">  
    function handleLoginRequest(xhr, status, args) {  
        if(args.validationFailed || !args.loggedIn) {  
            dlg.jq.effect("shake", { times:5 }, 100);  
        }   
        else {  
            dlg.hide();  
            $('#loginLink').fadeOut();  
        }  
        
    }  
</script>
</h:head>

<h:body
	style="
		background-image: url(imagem/wallpaper.jpg);
		background-repeat: no-repeat;
    	background_attachment: fixed;
		image-rendering: auto;
">
	<h:form id="form">
		<div style="position: absolute; left: 50%; margin-left: -400px; top: 40%; margin-top: -150px">
			<p:graphicImage value="imagem/logo_skytef.png" />
		</div>

<p:dialog header="Erro ao acessar :" widgetVar="dlg" modal="true"  
			style=" width: 200px;height:50px;margin-left:0px;" visible="#{LoginBean.visible}">
	<h:outputText value="#{LoginBean.msg}" />
</p:dialog>
		<div
			style="padding-right:38%; padding-left: 38%; margin-top: 25%;position:absolute; text-align: center;">
			<p:panel header="Login de Acesso ao Sistema">
				<h:panelGrid columns="2" cellpadding="5">
					<h:outputLabel for="username" value="Usuário:*" />
					<p:inputText value="#{LoginBean.username}" id="username"
						label="Usuário" 
						 />
					<h:outputLabel for="password" value="Senha:*" />
					<h:inputSecret value="#{LoginBean.password}" 
						 id="password"
						label="Senha" />

					<f:facet name="footer">
						<p:commandButton id="LoginButton" value="Login" update="growl"
							actionListener="#{LoginBean.login}" ajax="false"
							oncomplete="handleLoginRequest(xhr, status, args)" />
					</f:facet>
				</h:panelGrid>
			</p:panel>
		</div>
	</h:form>

	<div class="rodape">
		<p:outputLabel value="Versão Homologação 1.0.379"
			style="position:absolute;
	height: 15px;
	text-align: center;
	margin-left: -65px;
	left: 50%;
	top: 97.5%;
	font-size: 10px" />
	</div>
</h:body>
</html>



